<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <title>使用Java、Excel数据分析如何有效投资房产 | 程序猜想</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="写在前面的话2017年IT业中多起猝死、自杀，创业的九死一生，各大公司清算、裁员等。年底也总是充斥着各种活动刷屏，年终总结、账单等。30岁的程序猿什么的，不幸我们可能也是其中之一。要改变现状，离不开钱与投资，提到投资就不得不提房。过去数十年的房价颠覆了努力工作改变生活的思维。作为程序猿比他人多的优势在于可以利用互联网数据进行数据分析决策，接下来看看基于链家中重庆渝北区人和二手房及国家全国商品房销售">
<meta name="keywords" content="Excel,数据分析,Java数据分析房价">
<meta property="og:type" content="article">
<meta property="og:title" content="使用Java、Excel数据分析如何有效投资房产">
<meta property="og:url" content="https://blog.520wa.com/2018/01/27/data-analysis-house-price/index.html">
<meta property="og:site_name" content="程序猜想">
<meta property="og:description" content="写在前面的话2017年IT业中多起猝死、自杀，创业的九死一生，各大公司清算、裁员等。年底也总是充斥着各种活动刷屏，年终总结、账单等。30岁的程序猿什么的，不幸我们可能也是其中之一。要改变现状，离不开钱与投资，提到投资就不得不提房。过去数十年的房价颠覆了努力工作改变生活的思维。作为程序猿比他人多的优势在于可以利用互联网数据进行数据分析决策，接下来看看基于链家中重庆渝北区人和二手房及国家全国商品房销售">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://blog.520wa.com/css/images/20180127_village_unitprice_histogram.png">
<meta property="og:image" content="https://blog.520wa.com/css/images/20180127_village_sum_pie_chat.png">
<meta property="og:image" content="https://blog.520wa.com/css/images/20180127_structure_pie_chart.png">
<meta property="og:image" content="https://blog.520wa.com/css/images/20180127_acreage_china_line_chart.png">
<meta property="og:image" content="https://blog.520wa.com/css/images/20180127_acreage_cq_line_chart.png">
<meta property="og:updated_time" content="2019-11-21T12:51:12.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用Java、Excel数据分析如何有效投资房产">
<meta name="twitter:description" content="写在前面的话2017年IT业中多起猝死、自杀，创业的九死一生，各大公司清算、裁员等。年底也总是充斥着各种活动刷屏，年终总结、账单等。30岁的程序猿什么的，不幸我们可能也是其中之一。要改变现状，离不开钱与投资，提到投资就不得不提房。过去数十年的房价颠覆了努力工作改变生活的思维。作为程序猿比他人多的优势在于可以利用互联网数据进行数据分析决策，接下来看看基于链家中重庆渝北区人和二手房及国家全国商品房销售">
<meta name="twitter:image" content="https://blog.520wa.com/css/images/20180127_village_unitprice_histogram.png">
  
  
    <link rel="icon" href="/css/images/qrcode4assert1024.jpg">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css">
  

  <script>
  var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?e666d013b82854116bc37c32dd2f43e3";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
  </script>
</head>
</html>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">程序猜想</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">写Java EE的Android程序员</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
          <a class="main-nav-link" href="/about">About</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://blog.520wa.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-data-analysis-house-price" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2018/01/27/data-analysis-house-price/" class="article-date">
  <time datetime="2018-01-27T13:47:06.000Z" itemprop="datePublished">2018-01-27</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据/">数据</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      使用Java、Excel数据分析如何有效投资房产
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h4 id="写在前面的话"><a href="#写在前面的话" class="headerlink" title="写在前面的话"></a>写在前面的话</h4><p>2017年IT业中多起猝死、自杀，创业的九死一生，各大公司清算、裁员等。年底也总是充斥着各种活动刷屏，年终总结、账单等。30岁的程序猿什么的，不幸我们可能也是其中之一。要改变现状，离不开钱与投资，提到投资就不得不提房。过去数十年的房价颠覆了努力工作改变生活的思维。作为程序猿比他人多的优势在于可以利用互联网数据进行数据分析决策，接下来看看<font color="red">基于链家中重庆渝北区人和二手房及国家全国商品房销售面积统计的简单数据分析</font>。<br><a id="more"></a></p>
<h4 id="数据收集"><a href="#数据收集" class="headerlink" title="数据收集"></a>数据收集</h4><h5 id="链家公共数据"><a href="#链家公共数据" class="headerlink" title="链家公共数据"></a>链家公共数据</h5><p>链家的url很标准，我们要获取的数据如下<a href="https://cq.lianjia.com/ershoufang/renhe/" target="_blank" rel="noopener">【人和二手房_重庆人和二手房出售】(重庆链家网)</a>，2018年1月27日数据为472条，共16页，url格式为<br><a href="https://cq.lianjia.com/ershoufang/renhe/pg1/" target="_blank" rel="noopener">https://cq.lianjia.com/ershoufang/renhe/pg1/</a><br>…<br><a href="https://cq.lianjia.com/ershoufang/renhe/pg16/" target="_blank" rel="noopener">https://cq.lianjia.com/ershoufang/renhe/pg16/</a>  </p>
<h5 id="Java-Jsoup爬虫"><a href="#Java-Jsoup爬虫" class="headerlink" title="Java Jsoup爬虫"></a>Java Jsoup爬虫</h5><p>现在全职Java，且为了快速实现采用Jsoup获取Html数据，代码非常简单</p>
<figure class="highlight applescript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Document document = Jsoup.connect(domain + uri)</span><br><span class="line">   .userAgent(<span class="string">"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"</span>)</span><br><span class="line">   .<span class="keyword">timeout</span>(<span class="number">30000</span>).<span class="keyword">get</span>();</span><br></pre></td></tr></table></figure>
<h5 id="保存Html数据至本地文件"><a href="#保存Html数据至本地文件" class="headerlink" title="保存Html数据至本地文件"></a>保存Html数据至本地文件</h5><p>厚道的链家并未做防爬虫，也有可能是为了对搜索引擎友好，提高曝光率。数据获取后要保存至本地文件就简单了，合并后代码如下</p>
<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">String</span> saveHtml(<span class="keyword">String</span> domain, <span class="keyword">String</span> uri) &#123;</span><br><span class="line">  FileOutputStream out = null;</span><br><span class="line">  <span class="built_in">File</span> dest = <span class="keyword">new</span> <span class="built_in">File</span>(<span class="string">"src/temp_html/"</span> + (uri.endsWith(<span class="string">"/"</span>) ? uri.substring(<span class="number">0</span>, uri.length() - <span class="number">1</span>) : uri) + <span class="string">".html"</span>);</span><br><span class="line">  <span class="built_in">try</span> &#123;</span><br><span class="line">    Document document = Jsoup.<span class="built_in">connect</span>(domain + uri)</span><br><span class="line">        .userAgent(<span class="string">"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"</span>)</span><br><span class="line">        .timeout(<span class="number">30000</span>).<span class="built_in">get</span>();</span><br><span class="line"></span><br><span class="line">    <span class="built_in">if</span> (!dest.getParentFile().<span class="built_in">exists</span>()) &#123;</span><br><span class="line">      dest.getParentFile().mkdirs();</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="built_in">if</span> (!dest.<span class="built_in">exists</span>()) &#123;</span><br><span class="line">      dest.createNewFile();</span><br><span class="line">    &#125;</span><br><span class="line">    out = <span class="keyword">new</span> FileOutputStream(dest, false);</span><br><span class="line">    out.<span class="built_in">write</span>(document.toString().getBytes(<span class="string">"UTF-8"</span>));</span><br><span class="line">    out.<span class="built_in">close</span>();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  &#125; <span class="built_in">catch</span> (IOException e) &#123;</span><br><span class="line">    e.printStackTrace();</span><br><span class="line">    <span class="built_in">return</span> null;</span><br><span class="line">  &#125; finally &#123;</span><br><span class="line">    IOUtils.closeQuietly(out);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="built_in">return</span> dest.getPath();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="通过Jsoup解析数据至Excel"><a href="#通过Jsoup解析数据至Excel" class="headerlink" title="通过Jsoup解析数据至Excel"></a>通过Jsoup解析数据至Excel</h5><p>再将html中数据解析使用POI写入Excel就相对简单了，主要在于规则匹配</p>
<h6 id="解析数据"><a href="#解析数据" class="headerlink" title="解析数据"></a>解析数据</h6><figure class="highlight processing"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> List&lt;House&gt; parseHtml(<span class="keyword">String</span> fileName) &#123;</span><br><span class="line">    List&lt;House&gt; houses = <span class="keyword">null</span>;</span><br><span class="line">    <span class="comment">//读取本地html的路径</span></span><br><span class="line">    File file = <span class="keyword">new</span> File(fileName);</span><br><span class="line">    <span class="comment">//写个循环读取这些文件的名字</span></span><br><span class="line">    <span class="keyword">try</span> &#123;</span><br><span class="line">      <span class="keyword">if</span> (file.isFile()) &#123;</span><br><span class="line">        logger.info(<span class="string">"文件&#123;&#125;开始解析"</span>, fileName);</span><br><span class="line"></span><br><span class="line">        <span class="comment">//下面开始解析本地的html</span></span><br><span class="line">        Document doc = Jsoup.parse(file, <span class="string">"UTF-8"</span>);</span><br><span class="line">        Elements sellListContents = doc.select(<span class="string">"ul.sellListContent"</span>);</span><br><span class="line">        <span class="keyword">if</span> (!ObjectUtils.isEmpty(sellListContents)) &#123;</span><br><span class="line">          Element sellListContent = sellListContents.first();</span><br><span class="line">          Elements sellContents = sellListContent.select(<span class="string">"li.clear"</span>);</span><br><span class="line">          <span class="keyword">if</span> (!ObjectUtils.isEmpty(sellListContents)) &#123;</span><br><span class="line">            houses = <span class="keyword">new</span> ArrayList&lt;&gt;(sellContents.<span class="built_in">size</span>());</span><br><span class="line">            <span class="keyword">for</span> (<span class="built_in">int</span> i = <span class="number">0</span>; i &lt; sellContents.<span class="built_in">size</span>(); i++) &#123;</span><br><span class="line">              Element sellList = sellContents.<span class="built_in">get</span>(i);</span><br><span class="line">              Elements sellElements = sellList.select(<span class="string">"div.clear"</span>);</span><br><span class="line">              <span class="keyword">if</span> (<span class="keyword">null</span> != sellElements &amp;&amp; sellElements.<span class="built_in">size</span>() == <span class="number">1</span>) &#123;</span><br><span class="line">                House house = <span class="keyword">new</span> House();</span><br><span class="line">                Element infoElement = sellElements.first();</span><br><span class="line"></span><br><span class="line">                Element titleElement = infoElement.select(<span class="string">"div.title"</span>).first().select(<span class="string">"a[href]"</span>).first();</span><br><span class="line">                house.setTitle(titleElement.<span class="built_in">text</span>());</span><br><span class="line">                house.setUrl(titleElement.attr(<span class="string">"href"</span>));</span><br><span class="line"></span><br><span class="line">                Element houseInfoElement = infoElement.selectFirst(<span class="string">"div.houseInfo"</span>);</span><br><span class="line">                house.setVillage(houseInfoElement.select(<span class="string">"a"</span>).first().<span class="built_in">text</span>());</span><br><span class="line">                <span class="keyword">String</span> houseInfo = houseInfoElement.<span class="built_in">text</span>();</span><br><span class="line">                <span class="keyword">String</span>[] houseInfos = houseInfo.<span class="built_in">split</span>(<span class="string">"\\|"</span>);</span><br><span class="line"></span><br><span class="line">                <span class="keyword">for</span> (<span class="built_in">int</span> j = <span class="number">1</span>; j &lt; houseInfos.length; j++</span><br><span class="line">                    ) &#123;</span><br><span class="line">                  <span class="keyword">switch</span> (j) &#123;</span><br><span class="line">                    <span class="keyword">case</span> <span class="number">1</span>:</span><br><span class="line">                      house.setStructure(houseInfos[j].<span class="built_in">trim</span>());</span><br><span class="line">                      <span class="keyword">break</span>;</span><br><span class="line">                    <span class="keyword">case</span> <span class="number">2</span>:</span><br><span class="line">                      house.setAcreage(houseInfos[j].replace(<span class="string">"平米"</span>, <span class="string">""</span>).<span class="built_in">trim</span>());</span><br><span class="line">                      <span class="keyword">break</span>;</span><br><span class="line">                    <span class="keyword">case</span> <span class="number">3</span>:</span><br><span class="line">                      house.setOrientation(houseInfos[j].<span class="built_in">trim</span>());</span><br><span class="line">                      <span class="keyword">break</span>;</span><br><span class="line">                    <span class="keyword">case</span> <span class="number">4</span>:</span><br><span class="line">                      house.setDecoration(houseInfos[j].<span class="built_in">trim</span>());</span><br><span class="line">                      <span class="keyword">break</span>;</span><br><span class="line">                    <span class="keyword">case</span> <span class="number">5</span>:</span><br><span class="line">                      house.setElevator(houseInfos[j].<span class="built_in">trim</span>());</span><br><span class="line">                      <span class="keyword">break</span>;</span><br><span class="line">                  &#125;</span><br><span class="line">                &#125;</span><br><span class="line">                Element positionInfoElement = infoElement.selectFirst(<span class="string">"div.positionInfo"</span>);</span><br><span class="line">                house.setRegion(positionInfoElement.select(<span class="string">"a"</span>).first().<span class="built_in">text</span>());</span><br><span class="line">                <span class="keyword">String</span> position = positionInfoElement.<span class="built_in">text</span>().<span class="built_in">split</span>(house.getRegion())[<span class="number">0</span>].<span class="built_in">trim</span>();</span><br><span class="line"></span><br><span class="line">                house</span><br><span class="line">                    .setPosition(position.lastIndexOf(<span class="string">"-"</span>) == position.length() - <span class="number">1</span> ? position.substring(<span class="number">0</span>, position.length() - <span class="number">1</span>).<span class="built_in">trim</span>() : position);</span><br><span class="line"></span><br><span class="line">                house.setTag(infoElement.selectFirst(<span class="string">"div.tag"</span>).<span class="built_in">text</span>());</span><br><span class="line"></span><br><span class="line">                Element priceInfoElement = infoElement.selectFirst(<span class="string">"div.priceInfo"</span>);</span><br><span class="line">                house.setTotalPrice(priceInfoElement.selectFirst(<span class="string">"div.totalPrice"</span>).<span class="built_in">text</span>().replace(<span class="string">"万"</span>, <span class="string">""</span>));</span><br><span class="line"></span><br><span class="line">                house.setUnitPrice(priceInfoElement.selectFirst(<span class="string">"div.unitPrice"</span>).<span class="built_in">text</span>().replace(<span class="string">"单价"</span>, <span class="string">""</span>).replace(<span class="string">"元/平米"</span>, <span class="string">""</span>).<span class="built_in">trim</span>());</span><br><span class="line"></span><br><span class="line">                logger.info(<span class="string">"解析第&#123;&#125;个元素，结果为：&#123;&#125;"</span>, i, house.toString());</span><br><span class="line">                houses.<span class="built_in">add</span>(house);</span><br><span class="line">              &#125;</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line">      logger.error(<span class="string">"文件&#123;&#125;解析错误"</span>, fileName, e);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> houses;</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure>
<h6 id="写入Excel"><a href="#写入Excel" class="headerlink" title="写入Excel"></a>写入Excel</h6><figure class="highlight pony"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line">public <span class="type">String</span> writeExcel(<span class="type">String</span> fileName, <span class="type">List</span>&lt;<span class="type">House</span>&gt; houses) &#123;</span><br><span class="line">    logger.info(<span class="string">"文件&#123;&#125;开始写入"</span>, fileName);</span><br><span class="line">    <span class="keyword">try</span> (<span class="type">POIFSFileSystem</span> fs = <span class="function"><span class="keyword">new</span> <span class="title">POIFSFileSystem</span>(new <span class="type">FileInputStream</span>(fileName))) &#123;</span></span><br><span class="line"><span class="function">      <span class="title">Workbook</span> <span class="title">workbook</span> = <span class="title">new</span> <span class="title">HSSFWorkbook</span>(fs);</span></span><br><span class="line"><span class="function">      <span class="title">HSSFSheet</span> <span class="title">sheet</span> = (<span class="type">HSSFSheet</span>) <span class="title">workbook</span>.<span class="title">getSheetAt</span>(<span class="number">0</span>);</span></span><br><span class="line"><span class="function">      <span class="title">final</span> <span class="title">int</span> <span class="title">preLastRowNum</span> = <span class="title">sheet</span>.<span class="title">getLastRowNum</span>();</span></span><br><span class="line"><span class="function">      <span class="title">logger</span>.<span class="title">info</span>("文件&#123;&#125;,上次行数为&#123;&#125;", fileName, preLastRowNum);</span></span><br><span class="line"><span class="function">      <span class="title">for</span> (int i = <span class="number">0</span>; i &lt; houses.size(); <span class="title">i</span>++) &#123;</span></span><br><span class="line"><span class="function">        <span class="title">Row</span> <span class="title">row</span> = <span class="title">sheet</span>.<span class="title">createRow</span>(preLastRowNum + i + <span class="number">1</span>);</span></span><br><span class="line"><span class="function">        <span class="title">House</span> <span class="title">house</span> = <span class="title">houses</span>.<span class="title">get</span>(i);</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">0</span>).<span class="title">setCellValue</span>(preLastRowNum + i + <span class="number">1</span>);</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">1</span>).<span class="title">setCellValue</span>(house.getTitle());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">2</span>).<span class="title">setCellValue</span>(house.getTotalPrice());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">3</span>).<span class="title">setCellValue</span>(house.getUnitPrice());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">4</span>).<span class="title">setCellValue</span>(house.getVillage());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">5</span>).<span class="title">setCellValue</span>(house.getStructure());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">6</span>).<span class="title">setCellValue</span>(house.getAcreage());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">7</span>).<span class="title">setCellValue</span>(house.getOrientation());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">8</span>).<span class="title">setCellValue</span>(house.getDecoration());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">9</span>).<span class="title">setCellValue</span>(house.getElevator());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">10</span>).<span class="title">setCellValue</span>(house.getPosition());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">11</span>).<span class="title">setCellValue</span>(house.getRegion());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">12</span>).<span class="title">setCellValue</span>(house.getTag());</span></span><br><span class="line"><span class="function">        <span class="title">row</span>.<span class="title">createCell</span>(<span class="number">13</span>).<span class="title">setCellValue</span>(house.getUrl());</span></span><br><span class="line"><span class="function">      &#125;</span></span><br><span class="line"><span class="function">      <span class="title">FileOutputStream</span> <span class="title">fileOut</span> = <span class="title">new</span> <span class="title">FileOutputStream</span>(fileName);</span></span><br><span class="line"><span class="function">      <span class="title">workbook</span>.<span class="title">write</span>(fileOut);</span></span><br><span class="line"><span class="function">      <span class="title">IOUtils</span>.<span class="title">closeQuietly</span>(fileOut);</span></span><br><span class="line"><span class="function">      <span class="title">logger</span>.<span class="title">info</span>("文件&#123;&#125;写入完成,&#123;&#125;-&#123;&#125;行", fileName, preLastRowNum + <span class="number">1</span>, preLastRowNum + houses.size());</span></span><br><span class="line"><span class="function">    &#125; <span class="title">catch</span> (<span class="type">IOException</span> e) &#123;</span></span><br><span class="line"><span class="function">      <span class="title">logger</span>.<span class="title">error</span>("excel-&#123;&#125;处理出错", fileName, e);</span></span><br><span class="line"><span class="function">    &#125;</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">    <span class="title">return</span> <span class="title">fileName</span>;</span></span><br><span class="line"><span class="function">  &#125;</span></span><br></pre></td></tr></table></figure>
<h4 id="数据处理"><a href="#数据处理" class="headerlink" title="数据处理"></a>数据处理</h4><p>写入后核对数据没什么问题，然后需要对数据进行简单处理。  </p>
<h5 id="删除车位、别墅"><a href="#删除车位、别墅" class="headerlink" title="删除车位、别墅"></a>删除车位、别墅</h5><p>观察发现数据中有车位、别墅存在，不在我们投资范围，需要从类别中筛选出并删除</p>
<h5 id="重复数据"><a href="#重复数据" class="headerlink" title="重复数据"></a>重复数据</h5><p>小区名称中发现有如棕榈泉一期、棕榈泉二期、棕榈泉三期字样，我们此次的初步分析暂时不需要这样统计，在后期具体决策时再才需要参考某期是否离轻轨、学校更近，车位比更高等。所以也需要通过函数全部替换成“棕榈泉”。</p>
<h4 id="数据分析展现"><a href="#数据分析展现" class="headerlink" title="数据分析展现"></a>数据分析展现</h4><p>数据分析在多年拉卡拉、中汇支付风控、合规经验的老婆手把手教导下完成，大量运用透视图  </p>
<h5 id="小区平均单价分析"><a href="#小区平均单价分析" class="headerlink" title="小区平均单价分析"></a>小区平均单价分析</h5><p>初步数据处理后，不会再有总价500w这种不忍直视的内容，此时我们需要来个直观的小区平均单价柱状图冲击一下<br><img src="/css/images/20180127_village_unitprice_histogram.png" alt="小区平均单价柱状图"><br>小区平均单价  </p>
<table>
<thead>
<tr>
<th>类型</th>
<th>平均单价（元）</th>
<th>小区</th>
</tr>
</thead>
<tbody>
<tr>
<td>最高</td>
<td>20,000</td>
<td>比毕得豪园</td>
</tr>
<tr>
<td>最低</td>
<td>6,480</td>
<td>人和家园</td>
</tr>
<tr>
<td>平均</td>
<td>14,151.46</td>
</tr>
</tbody>
</table>
<p>当然这个价格并不准确，其中有房龄、交通、装修、是否带学校指标等其它因素，但是至少可以让我们跨出第一步让自己对市场价格有一定的认知，计算自己可承受的价位</p>
<h5 id="房源数量分析"><a href="#房源数量分析" class="headerlink" title="房源数量分析"></a>房源数量分析</h5><p>接下来看看房源多的一些小区，经过我们之前处理过后不分几期几期后只取前20，分布如下<br><img src="/css/images/20180127_village_sum_pie_chat.png" alt="房源前20小区饼状图"><br>棕榈泉的楼盘本身大房子数量多，且含有别墅洋房及高层，出售最多，占比27.32%力夺第二的9.02%。想必其中很多都是投资来的，如果分析清水与装修过的比例、持有房子年限等应该是可以分析出来   </p>
<h5 id="户型占比分析"><a href="#户型占比分析" class="headerlink" title="户型占比分析"></a>户型占比分析</h5><p>作为投资户型极其重要，市场上哪些户型受欢迎，新楼盘也一样会对人群分析，对楼盘人群定位。<br><img src="/css/images/20180127_structure_pie_chart.png" alt="户型饼状图"><br>3室2厅大比分夺得冠军，4室2厅为第二出乎意料，应该具体分析这些房子的出处是否为棕榈泉的洋房。除去4室2厅外，3室2厅和2室2厅都在我们接受的范围，像我们没有多少财力的年轻人很多第一套房会选择2室2厅，够自己和孩子住，但是如果加入父母就不够住了，多半会卖掉换一个3室2厅。<br>由此可以得出结论，如果目标为这些改善型的人群，3室2厅是最佳选择<br>如果财力有限可以可以买2室2厅<br>如果钱更少是否需要买个1室来投资出租，就该考虑地段及租金的关联关系了。  </p>
<h5 id="全国商品房销售面积分析"><a href="#全国商品房销售面积分析" class="headerlink" title="全国商品房销售面积分析"></a>全国商品房销售面积分析</h5><p>2月3日对全国商品房销售面积抓取，制作简单折线图<br><img src="/css/images/20180127_acreage_china_line_chart.png" alt="全国销售面积"><br><img src="/css/images/20180127_acreage_cq_line_chart.png" alt="重庆销售面积">  </p>
<h6 id="其实还有很多可分析，想必房子的热门程度和价格是有一定关系，多久可以收回成本等。程序猿总是想太多，一个简单需求整成了一个价格监控、预测系统。所以本文只做简单分析，代码也很简单，2小时左右。"><a href="#其实还有很多可分析，想必房子的热门程度和价格是有一定关系，多久可以收回成本等。程序猿总是想太多，一个简单需求整成了一个价格监控、预测系统。所以本文只做简单分析，代码也很简单，2小时左右。" class="headerlink" title="其实还有很多可分析，想必房子的热门程度和价格是有一定关系，多久可以收回成本等。程序猿总是想太多，一个简单需求整成了一个价格监控、预测系统。所以本文只做简单分析，代码也很简单，2小时左右。"></a>其实还有很多可分析，想必房子的热门程度和价格是有一定关系，多久可以收回成本等。程序猿总是想太多，一个简单需求整成了一个价格监控、预测系统。所以本文只做简单分析，代码也很简单，2小时左右。</h6><h4 id="源码"><a href="#源码" class="headerlink" title="源码"></a>源码</h4><p>Github:<a href="https://github.com/2tu/house" target="_blank" rel="noopener">house</a></p>
<h6 id="转载请标明出处："><a href="#转载请标明出处：" class="headerlink" title="转载请标明出处："></a>转载请标明出处：</h6><h6 id="http-2tu-github-io-2018-01-27-data-analysis-house-price"><a href="#http-2tu-github-io-2018-01-27-data-analysis-house-price" class="headerlink" title="http://2tu.github.io/2018/01/27/data-analysis-house-price/"></a><a href="http://2tu.github.io/2018/01/27/data-analysis-house-price/" target="_blank" rel="noopener">http://2tu.github.io/2018/01/27/data-analysis-house-price/</a></h6><h6 id="本文出自Tu’s-blog"><a href="#本文出自Tu’s-blog" class="headerlink" title="本文出自Tu’s blog"></a>本文出自Tu’s blog</h6>
      
    </div>
    <footer class="article-footer">
      <a data-url="https://blog.520wa.com/2018/01/27/data-analysis-house-price/" data-id="ckcqflaw0000ieodecmnldltk" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Excel/">Excel</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java数据分析房价/">Java数据分析房价</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/数据分析/">数据分析</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2018/01/29/data-decision-go-home-time-in-the-spring-festival/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          基于数据决策春节怎样回家最不堵车
        
      </div>
    </a>
  
  
    <a href="/2018/01/18/NODE-ENV-cross/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">NODE_ENV跨平台设置</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Android/">Android</a><span class="category-list-count">15</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/C/">C++</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java/">Java</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/NDK-Samples/">NDK Samples</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Web/">Web</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/其它/">其它</a><span class="category-list-count">13</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/前端/">前端</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据/">数据</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/统计学/">统计学</a><span class="category-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/02-00-00-00-00-00/" style="font-size: 10px;">02:00:00:00:00:00</a> <a href="/tags/301/" style="font-size: 10px;">301</a> <a href="/tags/302/" style="font-size: 10px;">302</a> <a href="/tags/APKParser/" style="font-size: 10px;">APKParser</a> <a href="/tags/AXMLPrinter2/" style="font-size: 10px;">AXMLPrinter2</a> <a href="/tags/Activity/" style="font-size: 10px;">Activity</a> <a href="/tags/Android-TV/" style="font-size: 10px;">Android TV</a> <a href="/tags/AndroidStudio/" style="font-size: 10px;">AndroidStudio</a> <a href="/tags/Arithmetic/" style="font-size: 10px;">Arithmetic</a> <a href="/tags/AutoService/" style="font-size: 10px;">AutoService</a> <a href="/tags/Bean/" style="font-size: 10px;">Bean</a> <a href="/tags/Butterknife/" style="font-size: 10px;">Butterknife</a> <a href="/tags/C/" style="font-size: 10px;">C++</a> <a href="/tags/Content-Type/" style="font-size: 10px;">Content-Type</a> <a href="/tags/DataBinding/" style="font-size: 10px;">DataBinding</a> <a href="/tags/DateFormat/" style="font-size: 10px;">DateFormat</a> <a href="/tags/Debugger/" style="font-size: 10px;">Debugger</a> <a href="/tags/DownloadManager/" style="font-size: 10px;">DownloadManager</a> <a href="/tags/Excel/" style="font-size: 10px;">Excel</a> <a href="/tags/FeignClient/" style="font-size: 10px;">FeignClient</a> <a href="/tags/FormEncoder/" style="font-size: 10px;">FormEncoder</a> <a href="/tags/Gradle/" style="font-size: 20px;">Gradle</a> <a href="/tags/Gson-serialization-deserialization-enum/" style="font-size: 10px;">Gson serialization/deserialization enum</a> <a href="/tags/Gson反序列化枚举/" style="font-size: 10px;">Gson反序列化枚举</a> <a href="/tags/Gson序列化枚举/" style="font-size: 10px;">Gson序列化枚举</a> <a href="/tags/How-compress/" style="font-size: 10px;">How compress</a> <a href="/tags/Http-Status-Code/" style="font-size: 10px;">Http Status Code</a> <a href="/tags/HttpClient/" style="font-size: 10px;">HttpClient</a> <a href="/tags/Huffman/" style="font-size: 10px;">Huffman</a> <a href="/tags/JNI/" style="font-size: 10px;">JNI</a> <a href="/tags/Java数据分析房价/" style="font-size: 10px;">Java数据分析房价</a> <a href="/tags/Jenkins/" style="font-size: 10px;">Jenkins</a> <a href="/tags/JitPack/" style="font-size: 10px;">JitPack</a> <a href="/tags/JsonDeserializer/" style="font-size: 10px;">JsonDeserializer</a> <a href="/tags/JsonSerializer/" style="font-size: 10px;">JsonSerializer</a> <a href="/tags/Mock/" style="font-size: 10px;">Mock</a> <a href="/tags/NODE-ENV/" style="font-size: 10px;">NODE_ENV</a> <a href="/tags/Native/" style="font-size: 10px;">Native</a> <a href="/tags/NetworkInterface/" style="font-size: 10px;">NetworkInterface</a> <a href="/tags/NullPointException/" style="font-size: 10px;">NullPointException</a> <a href="/tags/OSS/" style="font-size: 10px;">OSS</a> <a href="/tags/Qualifier/" style="font-size: 10px;">Qualifier</a> <a href="/tags/RestTemplate/" style="font-size: 10px;">RestTemplate</a> <a href="/tags/RestoreInstance/" style="font-size: 10px;">RestoreInstance</a> <a href="/tags/SDK/" style="font-size: 10px;">SDK</a> <a href="/tags/SDK更新给开发者/" style="font-size: 10px;">SDK更新给开发者</a> <a href="/tags/SimpleDateFormat/" style="font-size: 10px;">SimpleDateFormat</a> <a href="/tags/Spring/" style="font-size: 15px;">Spring</a> <a href="/tags/SpringBatch/" style="font-size: 10px;">SpringBatch</a> <a href="/tags/StepScope/" style="font-size: 10px;">StepScope</a> <a href="/tags/Time-Zone/" style="font-size: 10px;">Time Zone</a> <a href="/tags/TingPNG/" style="font-size: 10px;">TingPNG</a> <a href="/tags/TransformException/" style="font-size: 10px;">TransformException</a> <a href="/tags/WEBGL-debug-renderer-info/" style="font-size: 10px;">WEBGL_debug_renderer_info</a> <a href="/tags/WIFI/" style="font-size: 10px;">WIFI</a> <a href="/tags/WebGL/" style="font-size: 10px;">WebGL</a> <a href="/tags/WebView/" style="font-size: 15px;">WebView</a> <a href="/tags/WebView水印/" style="font-size: 10px;">WebView水印</a> <a href="/tags/WifiInfo/" style="font-size: 10px;">WifiInfo</a> <a href="/tags/YYYY/" style="font-size: 10px;">YYYY</a> <a href="/tags/object-Object/" style="font-size: 15px;">[object Object]</a> <a href="/tags/annotationProcessor/" style="font-size: 10px;">annotationProcessor</a> <a href="/tags/antd-init/" style="font-size: 10px;">antd-init</a> <a href="/tags/applicaton/" style="font-size: 10px;">applicaton</a> <a href="/tags/brew/" style="font-size: 10px;">brew</a> <a href="/tags/chrome/" style="font-size: 10px;">chrome</a> <a href="/tags/crash/" style="font-size: 10px;">crash</a> <a href="/tags/create-umi/" style="font-size: 10px;">create-umi</a> <a href="/tags/cross-env/" style="font-size: 10px;">cross-env</a> <a href="/tags/dependencies/" style="font-size: 10px;">dependencies</a> <a href="/tags/dummy0/" style="font-size: 10px;">dummy0</a> <a href="/tags/duplicate-entry/" style="font-size: 10px;">duplicate entry</a> <a href="/tags/experimental-webgl/" style="font-size: 10px;">experimental-webgl</a> <a href="/tags/feign-form/" style="font-size: 10px;">feign-form</a> <a href="/tags/fit/" style="font-size: 10px;">fit</a> <a href="/tags/flavor/" style="font-size: 10px;">flavor</a> <a href="/tags/github-api/" style="font-size: 10px;">github api</a> <a href="/tags/iOS/" style="font-size: 15px;">iOS</a> <a href="/tags/image-jpeg/" style="font-size: 10px;">image/jpeg</a> <a href="/tags/install/" style="font-size: 10px;">install</a> <a href="/tags/ipv4/" style="font-size: 10px;">ipv4</a> <a href="/tags/ipv6/" style="font-size: 10px;">ipv6</a> <a href="/tags/jpeg/" style="font-size: 10px;">jpeg</a> <a href="/tags/libjpeg/" style="font-size: 10px;">libjpeg</a> <a href="/tags/libjpeg-turbo/" style="font-size: 10px;">libjpeg-turbo</a> <a href="/tags/mac/" style="font-size: 10px;">mac</a> <a href="/tags/manifest/" style="font-size: 10px;">manifest</a> <a href="/tags/mockjs/" style="font-size: 10px;">mockjs</a> <a href="/tags/module/" style="font-size: 10px;">module</a> <a href="/tags/ndk-camera/" style="font-size: 10px;">ndk camera</a> <a href="/tags/onActivityForResult/" style="font-size: 10px;">onActivityForResult</a> <a href="/tags/onPageFinished/" style="font-size: 10px;">onPageFinished</a> <a href="/tags/registerTypeAdapter/" style="font-size: 10px;">registerTypeAdapter</a> <a href="/tags/scope/" style="font-size: 10px;">scope</a> <a href="/tags/spawn/" style="font-size: 10px;">spawn</a> <a href="/tags/storage/" style="font-size: 10px;">storage</a> <a href="/tags/transformClassesWithJarMerging/" style="font-size: 10px;">transformClassesWithJarMerging</a> <a href="/tags/v36/" style="font-size: 10px;">v36</a> <a href="/tags/versionCode/" style="font-size: 10px;">versionCode</a> <a href="/tags/vue/" style="font-size: 10px;">vue</a> <a href="/tags/watermark/" style="font-size: 10px;">watermark</a> <a href="/tags/wlan0/" style="font-size: 10px;">wlan0</a> <a href="/tags/yyyy/" style="font-size: 10px;">yyyy</a> <a href="/tags/下载图片/" style="font-size: 10px;">下载图片</a> <a href="/tags/中位数/" style="font-size: 10px;">中位数</a> <a href="/tags/中程数/" style="font-size: 10px;">中程数</a> <a href="/tags/主动push/" style="font-size: 10px;">主动push</a> <a href="/tags/人脸支付/" style="font-size: 15px;">人脸支付</a> <a href="/tags/人脸比对效率/" style="font-size: 10px;">人脸比对效率</a> <a href="/tags/众数/" style="font-size: 10px;">众数</a> <a href="/tags/兼容问题/" style="font-size: 10px;">兼容问题</a> <a href="/tags/同步支付/" style="font-size: 10px;">同步支付</a> <a href="/tags/命名空间/" style="font-size: 10px;">命名空间</a> <a href="/tags/图片链接/" style="font-size: 10px;">图片链接</a> <a href="/tags/均值/" style="font-size: 10px;">均值</a> <a href="/tags/多形参/" style="font-size: 10px;">多形参</a> <a href="/tags/头文件/" style="font-size: 10px;">头文件</a> <a href="/tags/如何主动PUSH/" style="font-size: 10px;">如何主动PUSH</a> <a href="/tags/异步支付/" style="font-size: 10px;">异步支付</a> <a href="/tags/引流/" style="font-size: 10px;">引流</a> <a href="/tags/支付/" style="font-size: 10px;">支付</a> <a href="/tags/数据决策/" style="font-size: 10px;">数据决策</a> <a href="/tags/数据分析/" style="font-size: 10px;">数据分析</a> <a href="/tags/春运交通情况/" style="font-size: 10px;">春运交通情况</a> <a href="/tags/智能硬件/" style="font-size: 10px;">智能硬件</a> <a href="/tags/权限/" style="font-size: 10px;">权限</a> <a href="/tags/极差/" style="font-size: 10px;">极差</a> <a href="/tags/构造函数/" style="font-size: 10px;">构造函数</a> <a href="/tags/模板/" style="font-size: 10px;">模板</a> <a href="/tags/水印/" style="font-size: 10px;">水印</a> <a href="/tags/浏览器显示图片/" style="font-size: 10px;">浏览器显示图片</a> <a href="/tags/用户体验/" style="font-size: 10px;">用户体验</a> <a href="/tags/网页水印/" style="font-size: 10px;">网页水印</a> <a href="/tags/脸部特征计算/" style="font-size: 10px;">脸部特征计算</a> <a href="/tags/蓝牙/" style="font-size: 10px;">蓝牙</a> <a href="/tags/蜻蜓/" style="font-size: 10px;">蜻蜓</a> <a href="/tags/重载默认参数函数/" style="font-size: 10px;">重载默认参数函数</a> <a href="/tags/阿里云显示图片/" style="font-size: 10px;">阿里云显示图片</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/07/">July 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/04/">April 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/01/">January 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">November 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">September 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">May 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/04/">April 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">March 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/02/">February 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/">January 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/">December 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/">November 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/09/">September 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/">January 2018</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/">December 2017</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">June 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">May 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/">April 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/">March 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/">May 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">March 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">February 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">December 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">October 2015</a><span class="archive-list-count">3</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2020/07/17/browser-view-or-download-image-by-header/">浏览器打开图片链接时直接显示或下载到底怎么回事</a>
          </li>
        
          <li>
            <a href="/2020/04/19/watermark-by-android/">Android中添加背景水印，含WebView</a>
          </li>
        
          <li>
            <a href="/2020/04/08/use_mockjs_vue/">VUE中使用Mock模拟数据请求</a>
          </li>
        
          <li>
            <a href="/2020/04/04/annotation-proccor-by-gradle4-7/">annotationProcessor 引用后编译时不生效问题</a>
          </li>
        
          <li>
            <a href="/2020/01/08/enum-serializer-by-Gson/">Gson序列化、反序列化枚举</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 Tu<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>